import request from '@/utils/request'

// 楼宇列表查询
export function getBuildingListAPI(params) {
  return request({
    url: '/park/building',
    method: 'GET',
    params
  })
}

// 查询可租赁楼宇park/rent/building
export function getBuildingRentAPI() {
  return request({
    url: '/park/rent/building',
    method: 'GET'
  })
}

// 添加楼宇
export function createBuildingListAPI(data) {
  return request({
    url: '/park/building',
    method: 'POST',
    data
  })
}

// 编辑楼宇/park/building
export function editBuildingListAPI(data) {
  return request({
    url: '/park/building',
    method: 'PUT',
    data
  })
}

// 删除楼宇/park/building/{id}
export function deleteBuildingAPI(id) {
  return request({
    url: '/park/building/' + id,
    method: 'DELETE'
  })
}

// 楼宇详情查询/park/building/{id}
export function getBuildingDetailAPI(id) {
  return request({
    url: '/park/building/' + id,
    method: 'GET'
  })
}
